/**
        Author: SpringHack - springhack@live.cn
        Last modified: 2017-02-09 21:23:30
        Filename: xml.js
        Description: Created by SpringHack using vim automatically.
**/
export default {
    obtainTicket(Config, req, res) {
        return `<ObtainTicketResponse><message></message><prolongationPeriod>${Config.PROLONGATION_PERIOD}</prolongationPeriod><responseCode>OK</responseCode><salt>${req.query.salt}</salt><ticketId>1</ticketId><ticketProperties>licensee=${Config.LICENSEE}	licenseType=0	</ticketProperties></ObtainTicketResponse>`;
    },
    ping(Config, req, res) {
        return `<PingResponse><message></message><responseCode>OK</responseCode><salt>${req.query.salt}</salt></PingResponse>`;
    },
    prolongTicket(Config, req, res) {
        return `<ProlongTicketResponse><message></message><responseCode>OK</responseCode><salt>${req.query.salt}</salt><ticketId>${req.query.ticketId}</ticketId></ProlongTicketResponse>`;
    },
    releaseTicket(Config, req, res) {
        res.status(301);
        return '301 Not accept';
    } 
}
